/*
 * LDIR
 *
 * LDIR, a GPS cartography application built for Let's Do It Romania eco
 * campaign.
 * Copyright (C) 2010 Genera Software <office@generasoftware.com>
 *
 * http://generasoftware.com/
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 * Place, Suite 330, Boston, MA 02111-1307 USA
 */
#ifndef GPSUTILS_H_
#define GPSUTILS_H_

#include <e32base.h>

class CGPSNaviDecorator;
class CAknNavigationDecorator;

class GPSUtils
    {
public:
    static void AppendFormatLongitude( TDes& aBuf, TReal64 aLongitude );
    static void AppendFormatLatitude( TDes& aBuf, TReal64 aLatitude );
    static void AppendFormatAltitude( TDes& aBuf, TReal32 aAltitude );
    static void AppendFormatSpeed( TDes& aBuf, TReal32 aSpeed );
    static void AppendFormatSpeed( TDes& aBuf, TReal32 aSpeed,
        TReal32 aVerticalSpeed );
    static void AppendFormatCourse( TDes& aBuf, TReal32 aTrueCourse,
        TReal32 aHeading );
    static void AppendFormatAccuracy( TDes& aBuf, TReal32 aAccuracy );
    static void AppendFormatAccuracy( TDes& aBuf, TReal32 aAccuracy,
        TReal32 aVerticalAccuracy );
    static void AppendFormatDoP( TDes& aBuf, TReal32 aDoP );
    static void
        AppendFormatDoP( TDes& aBuf, TReal32 aDoP, TReal32 aVerticalDoP );
    static void AppendFormatSatelliteNum( TDes& aBuf, TInt8 aInView,
        TInt8 aUsed );
    static void AppendFormatTimeDateL( TDes& aBuf, const TTime& aTime,
        const TBool aConvLocalFlag );
    static void AppendFormatDateTimeL( TDes& aBuf, const TTime& aTime,
        const TBool aConvLocalFlag );
    static void AppendFormatTimeStampL( TDes& aBuf, const TDesC& aFormat,
        const TTime& aTime, const TBool aConvLocalFlag );
    static CGPSNaviDecorator* PushGPSNaviDecoratorL();
    static void PopGPSNaviDecoratorL( CAknNavigationDecorator* naviDecorator );
    static void SetNaN( TReal32& aValue );
    static void SetNaN( TReal64& aValue );
private:
    static void AppendFormatCoordinate( TDes& aBuf, TReal64 aCoordinate );
    static void AppendFormatFeetsMetres( TDes& aBuf, TReal32 aValue );
    static void AppendFormatKmph( TDes& aBuf, TReal32 aValue );
    };

#endif /* GPSUTILS_H_ */
